namespace UserInterface.Misc
{
    public class TitleGenerator
    {
        private string boardName; // For example "MADBoard Development Board"
        private string pageTitle; // For example "Register" or "View Topic"
        private string itemName; // For example a subject or username

        // Full title example "MADBoard Development Board - View Topic :: New Ideas"

        public string BoardName
        {
            set { boardName = value; }
        }

        public string PageTitle
        {
            set { pageTitle = value; }
        }

        public string ItemName
        {
            set { itemName = value; }
        }

        public string Generate()
        {
            string title = boardName;

            if (pageTitle != null)
            {
                title += " - " + pageTitle;
            }
            if (itemName != null)
            {
                title += " :: " + itemName;
            }

            return title;
        }
    }
}
